package cn.jilian.dao;

import java.util.Collection;
import java.util.List;

import org.springframework.data.repository.CrudRepository;

import cn.jilian.entity.Link;


public interface LinkDAO extends CrudRepository<Link, Long> {

	void deleteByRelate(long relate);
	
	void deleteBySource(long source);
	
	void deleteBySourceAndRelateIn(long source,Collection<Long> relates);
	
	List<Link> findBySourceAndRelateIn(long source,Collection<Long> relates);
	
	List<Link> findBySourceAndRank(Long source,Integer rank);
	
	void deleteByRelateIn(Collection<Long> relates);
}
